<div id="list-product" class="content scaffold-list" role="main">
		<g:if test="${flash.message}">
		<div class="message" role="status">${flash.message}</div>
		</g:if>
		<table>
			<thead>
				<tr>
					
					<g:sortableColumn property="productCode" title="${message(code: 'product.productCode.label', default: 'Product Code')}" params="${filterParams}"/>
					<g:sortableColumn property="productName" title="${message(code: 'product.productName.label', default: 'Product Name')}" params="${filterParams}"/>
					<g:sortableColumn property="productSpec" title="${message(code: 'product.productSpec.label', default: 'productSpec')}" params="${filterParams}"/>
					<g:sortableColumn property="unit" title="${message(code: 'product.unit.label', default: 'unit')}" params="${filterParams}"/>
					<g:sortableColumn property="productPackage" title="${message(code: 'product.productPackage.label', default: 'productPackage')}" params="${filterParams}"/>
					<g:sortableColumn property="price" title="${message(code: 'product.price.label', default: 'price')}" params="${filterParams}"/>
					<g:sortableColumn property="stockNum" title="${message(code: 'product.stockNum.label', default: 'stockNum')}" params="${filterParams}"/>
					<th><g:message code="operate.label" default="operate" /></th>
				</tr>
			</thead>
			<tbody>
			<g:each in="${productInstanceList}" status="i" var="productInstance">
				<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					<td><g:link action="show" id="${productInstance.id}">${fieldValue(bean: productInstance, field: "productCode")}</g:link></td>
					<td>${fieldValue(bean: productInstance, field: "productName")}</td>
					<td>${fieldValue(bean: productInstance, field: "productSpec")}</td>
					<td>${fieldValue(bean: productInstance, field: "unit")}</td>
					<td>${fieldValue(bean: productInstance, field: "productPackage")}</td>
					<td>${fieldValue(bean: price, field: "price")}</td>
					<td>${fieldValue(bean: stockNum, field: "stockNum")}</td>
					<td><g:link class="edit" action="edit" id="${productInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
						<g:link class="edit" action="delete" id="${productInstance?.id}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');">
						<g:message code="default.button.delete.label" default="Delete" /></g:link>
						<g:link class="edit" controller="knowlege" action="list"  id="${productInstance?.id}" params="[productId:productInstance.id]">编辑知识库</g:link>
					</td>
				</tr>
			</g:each>
			</tbody>
		</table>
		<div class="pagination">
			<g:paginate total="${productInstanceTotal}" action="filter" params="${filterParams}"/>
		</div>
	</div>


